package cn.elwy.rcp.ui.table.format;

import java.text.Format;
import java.text.ParseException;

public class ColumnFormat implements BaseFormat {

  private static final long serialVersionUID = 1L;

  private String pattern;
  private Format format;

  public ColumnFormat() {
  }

  public ColumnFormat(String pattern) {
    this.pattern = pattern;
  }

  @Override
  public String format(Object value) {
    return value == null ? "" : value.toString();
  }

  @Override
  public <T> T parse(String value, Class<T> clazz) throws ParseException {
    return null;
  }

  protected String getDefaultValue() {
    return null;
  }

  public String getPattern() {
    return pattern;
  }

  public void setPattern(String pattern) {
    this.pattern = pattern;
  }

  public Format getFormat() {
    return format;
  }

  public void setFormat(Format format) {
    this.format = format;
  }

}